package com.hospital.service;

import com.hospital.controller.Result;
import com.hospital.domain.Department;
import com.hospital.domain.Doctor;
import com.hospital.domain.User;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOError;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;

@Transactional(rollbackFor = {IOError.class})
public interface UserService {
    public List<User> selectAll();

    public List<Doctor> selectAllDoctor(String doctorName,int departmentID);

    public Result login(String accountNum, String userPWD, HttpServletRequest request, HttpServletResponse response) throws IOException;

    public List<Department> selectAllDep();

    public int addUser(User user);

    public User selectUser(int userID);

    int updateUser(User User);

    User selectUserByAccount(String accountNum);


}
